import java.util.ArrayList;
import java.util.Arrays;


public class dayTracker {
	private static int[] days = new int[31];
	private static int[] daysThirty = new int[31];
	private static int[] daysLeap = new int[31];
	private static int[] daysShort = new int[31];
	static ArrayList<int[]> year = new ArrayList<int[]>();
	static ArrayList<int[]> leapYear = new ArrayList<int[]>();
	ArrayList<ArrayList<int[]>> nYears = new ArrayList<ArrayList<int[]>>(); 
	
	public dayTracker(){

		//31 day String array and for loop
days = new int[31];

	for(int i = 0; i < 31; i++){
		days[i] = i+1;
	}
	

daysThirty = Arrays.copyOf(days,days.length);
	daysThirty[30] = -1;
daysLeap = Arrays.copyOf(days,days.length);
	daysLeap[30] = -1;
	daysLeap[29] = -1;
daysShort = Arrays.copyOf(days, days.length);
	daysShort[30] = -1;
	daysShort[29] = -1;
	daysShort[28] = -1;
//System.out.println(daysThirty.toString());
		

		//add day arrays to months arrayList

	


	}
	
	public static String toFullString(int[] array){
		String str = "";
		for(int i = 0; i < array.length; i++){
			str += array[i];
		}
		return str;
	}
	public String print(){
		String str = "";
		int[] ints = nYears.get(0).get(1);
		str += toFullString(ints);
		return str;
	}
	public int[] getDayThirty(){
			return daysThirty;
	}
	public int[] getDayLeap(){
		return daysLeap;
	}
	public int[] getDayLong(){
		return days;
	}
	public int[] getDayShort(){
		return daysShort;
	}
	public static ArrayList<int[]> createYear(){
	
		
			year.add(days);
			year.add(daysShort);
			year.add(days);
			year.add(daysThirty);
			year.add(days);
			year.add(daysThirty);
			year.add(days);
			year.add(days);
			year.add(daysThirty);
			year.add(days);
			year.add(daysThirty);
			year.add(days);
				
				
		
		return year;
	}
	
	public  ArrayList<ArrayList<int[]>> createNYears(){
		
		nYears.add(createYear());
		nYears.add(createYear());
		nYears.add(createYear());
		nYears.add(createLeap());
		nYears.add(createYear());
		nYears.add(createYear());
		nYears.add(createYear());
		
		
		
		
		
		
		return nYears;
	}
	
	public ArrayList<int[]> createLeap(){
		
		leapYear.add(days);
		leapYear.add(daysLeap);
		leapYear.add(days);
		leapYear.add(daysThirty);
		leapYear.add(days);
		leapYear.add(daysThirty);
		leapYear.add(days);
		leapYear.add(days);
		leapYear.add(daysThirty);
		leapYear.add(days);
		leapYear.add(daysThirty);
		leapYear.add(days);
			
			
	
	return leapYear;
		
	}
	
	public void printAllYears(){
		/*
		for(int i = 0; i < 7; i++){
			System.out.println();
			System.out.println();
			for(int m = 0; m < 12; m++){
				System.out.println();
					for(int n = 0; n < 31; n++){
						System.out.print(nYears.get(i).get(m)[n] + " ");
					}
			}
		}
		*/
	}
	
	public void setValue(int years, int months, int days, ArrayList<ArrayList<int[]>> list, int value){
		list.get(years).get(months)[days] = value;
	}

}


